﻿import request from '/@/utils/request';
enum Api {
  AddJiaoxueBan = '/api/jiaoxueBan/add',
  DeleteJiaoxueBan = '/api/jiaoxueBan/delete',
  UpdateJiaoxueBan = '/api/jiaoxueBan/update',
  PageJiaoxueBan = '/api/jiaoxueBan/page',
  DetailJiaoxueBan = '/api/jiaoxueBan/detail',
  ImportJiaoxueBan = '/api/jiaoxueBan/import',
  JiaoxueBanJiDropdown = '/api/jiaoxueBan/jiaoxueBanJiDropdown',
  
  GetTeacherBzrIdDropdown = '/api/jiaoxueBan/TeacherBzrIdDropdown',
}

// 增加教学班
export const addJiaoxueBan = (params?: any) =>
	request({
		url: Api.AddJiaoxueBan,
		method: 'post',
		data: params,
	});

// 删除教学班
export const deleteJiaoxueBan = (params?: any) => 
	request({
			url: Api.DeleteJiaoxueBan,
			method: 'post',
			data: params,
		});

// 编辑教学班
export const updateJiaoxueBan = (params?: any) => 
	request({
			url: Api.UpdateJiaoxueBan,
			method: 'post',
			data: params,
		});

// 分页查询教学班
export const pageJiaoxueBan = (params?: any) => 
	request({
			url: Api.PageJiaoxueBan,
			method: 'post',
			data: params,
		});

// 详情教学班
export const detailJiaoxueBan = (id: any) => 
	request({
			url: Api.DetailJiaoxueBan,
			method: 'get',
			data: { id },
		});

export const getTeacherBzrIdDropdown = () =>
		request({
		url: Api.GetTeacherBzrIdDropdown,
		method: 'get'
		});

		// 导入教学班
export const importJiaoxueBan = (fileId: any) => 
request({
		url: Api.ImportJiaoxueBan,
		method: 'post',
		data: { fileId },
	});

export const getJiaoxueBanJiDropdown = () =>
	request({
	url: Api.JiaoxueBanJiDropdown,
	method: 'get'
	});